using System.IO;
using NMock2;


namespace NMockExtensions
{
    public class NotMatcher : Matcher
    {
        private readonly Matcher condition;

        public NotMatcher(Matcher condition)
        {
            this.condition = condition;
        }

        public override bool Matches(object o)
        {
            return !condition.Matches(o);
        }

        public override void DescribeTo(TextWriter writer)
        {
            writer.WriteLine("The following is inverted!!!!!!!!");
            condition.DescribeTo(writer);
            writer.WriteLine("End of invertion!!!!!");
        }
    }
}